<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

<h:body>
    <h:form id="debitEmployeeMainForm">
        <h:panelGrid columns="2" cellpadding="10" cellspacing="10">
            <h:outputLabel for="employee" value="Сотрудник: "/>
            <p:autoComplete id="employee" queryDelay="500" value="#{employeesBean.employee.name}"
                            completeMethod="#{employeesBean.gelCompleteEmployee}"/>

            <h:outputLabel for="changeDate" value="Дата выплаты: "/>
            <p:calendar id="changeDate" value="#{employeesBean.costs.changeDate}" showButtonPanel="true"/>

            <f:facet name="footer">
                <p:commandButton value="Выплатить" actionListener="#{employeesBean.debit()}"
                                 oncomplete="handleDebitEmployeeRequest(xhr, status, args)"/>
                <p:commandButton value="Отмена" actionListener="#{employeesBean.closeDebit}"
                        immediate="true"/>
            </f:facet>
        </h:panelGrid>
    </h:form>
</h:body>

</html>